# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=cloog
pkgver=0.20.0
pkgrel=0
pkgdesc="The Chunky Loop Generator"
url="http://www.cloog.org/"
arch="all"
license="GPL-2.0-or-later"
depends_dev="gmp-dev isl-dev"
makedepends_host="$depends_dev"
makedepends="$makedepends_host"
subpackages="$pkgname-dev"
source="https://github.com/periscop/cloog/releases/download/cloog-$pkgver/cloog-$pkgver.tar.gz"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--with-sysroot=${CBUILDROOT} \
		--with-isl=system
	make
}

check() {
	make -j1 check
}

package() {
	make DESTDIR="$pkgdir" INSTALL="install -D" install
}

sha512sums="d00cbefd348b45d9d482320a088f7ae736440046b99469cbdfbb177a38dcef182c3305f0a567a1f5699c23b7108db6fd5ad6dfbc071d63ccca1d6bfc1b198565  cloog-0.20.0.tar.gz"
